﻿<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="~/lib/layui/css/layui.css" media="all">
    <link href="https://www.jq22.com/jquery/bootstrap-3.3.4.css" rel="stylesheet">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <script src="~/lib/layui/layui.js" charset="utf-8"></script>
    <script src="~/js/origion.js" charset="utf-8"></script>
    <script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
    <script src="https://www.jq22.com/jquery/1.11.1/jquery.min.js"></script>
    <script src="https://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
    <script src="~/js/address.js"></script>
    <script src="~/js/coffee.js"></script>
    <script src="~/js/tee.js"></script>
    <script src="~/js/wjh2.js"></script>
    <script src="~/js/wh2.js"></script>
    <style>

        .layui-table-cell {
            height: auto;
            overflow: visible;
            text-overflow: inherit;
            white-space: normal;
            word-break: break-all;
        }

        .layui-table-cell {
            height: auto;
            overflow: visible;
            text-overflow: inherit;
            white-space: normal;
        }

        .layui-input-inline {
            width: 185px;
        }

        .layui-tab > .layui-tab-title > .layui-this {
            border-bottom: 5px solid #ff7f00;
        }

        .xuexinlabel {
            width: 140px;
        }

        input {
            border: 0px;
        }

        td {
            border: 1px solid black;
            text-align: center;
            width: 120px;
        }

        input {
            word-wrap: break-word;
            word-break: break-all;
            overflow: visible;
        }

        .layui-table-patch {
            display: none;
        }

        .container {
        }

        .layui-table-view .layui-table th {
            background-color: white;
            border: 1px solid black;
            width: 120px;
        }

        .layui-table-view .layui-table td {
            border: 1px solid black;
            width: 120px;
        }
    </style>
    <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
</head>
<body style="margin-left:-30px;">
    <script>
        function getthejiaoyudataa() {
            $.ajax({
                url: "/Infos/Getthejiaoyuininfos" + '?Jbxxid=' + $("#jbxxid").val(),
                type: "get",
                async: false,
                success: function (datas) {
                    console.log(datas);
                    return datas;
                }
            })
        }
        layui.use('table', function () {
            var table = layui.table;
            table.render({
                elem: '#afilestable',
                data: getthejiaoyudataa(),

                defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
                    title: '提示'
                    , layEvent: 'LAYTABLE_TIPS'
                    , icon: 'layui-icon-tips'
                }]
                , title: '体检报告浏览'
                , page: true
            });

        })
        function getParam(paramName) {
            paramValue = "", isFound = !1;
            if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
                arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
                while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
            }
            return paramValue == "" && (paramValue = null), paramValue
        }

        function GetDingDept() {
            var data = [];
            $.ajax({
                url: "/TreeData/GetDingDeptData",
                type: "post",
                async: false,
                success: function (resut) {
                    data = resut;
                }
            });
            return data;
        }

        $(function () {
            var key = getParam("uuid");
            console.log(key);
            if (key != null) {
                var jbxxid = "";

                var a = diaoshen(jbxxid = key);
                console.log(a);
                console.log(a.corn[0].name);
                $("#jbxxid").val(key);

                $("#name").val(a.corn[0].name);
                $("#sexbox").val(a.corn[0].sex);
                $("#age").val(a.corn[0].age);
                $("#birthdate").val(a.corn[0].birthAge);
                $("#bloodbox").val(a.corn[0].bloodtype);

                $("#phonenumber").val(a.corn[0].phonenumber);
                $("#idNumber").val(a.corn[0].idNumber);
                $("#hjszplace").val(a.corn[0].hjszplace);
                $("#actuallyplace").val(a.corn[0].actuallyplace);

                $("#zhengzhimianmao").val(a.corn[0].zzmm);
                $("#dateOfJointhePartydate").val(a.corn[0].dateOfJointheParty);

                if (a.gangwei.length != 0) {
                    $("#worknumber").val(a.gangwei[0].worknumber);

                    $("#demo100").val(a.gangwei[0].department);
                    $("#demo200").val(a.gangwei[0].dingdepartment);
                    $("#gangwei").val(a.gangwei[0].gangwei);
                    $("#cengji").val(a.gangwei[0].cengji);
                    $("#zhiji").val(a.gangwei[0].zhiji);
                    $("#datestartwork").val(a.gangwei[0].workstarttime);
                    var workday = a.gangwei[0].workstarttime;

                    var workdayTime = new Date(workday).getTime();

                    var nowTime = new Date().getTime();
                    //一年毫秒数(365 * 86400000 = 31536000000)
                    console.log("161616616");
                    console.log(Math.ceil((nowTime - workdayTime) / 31536000000));
                    $("#workage").val(Math.ceil((nowTime - workdayTime) / 31536000000) - 1);
                }
                if (a.hunyin.length != 0) {
                    $("#hyzk").val(a.hunyin[0].hyzk);
                    $("#shengyu").val(a.hunyin[0].shengyu);
                    $("#kidsnumber").val(a.hunyin[0].kidsnumber);
                }
                if (a.situ.length != 0) {
                    $("#reasonofNotGood").val(a.situ[0].reasonofNotGood);
                    $("input[name='situation'][value='" + a.situ[0].situation + "']").prop("checked", true);
                    if (a.situ[0].situation == '不合格') {
                        $("#notpassstatus").show();
                        $("#uptjbg").hide();
                        $("#hegeyesorno").hide();
                    }
                }

            }
            var nations = ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族", "布依族", "朝鲜族", "满族", "侗族", "瑶族", "白族",
                "土家族", "哈尼族", "哈萨克族", "傣族", "黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族", "景颇族", "柯尔克孜族", "土族",
                "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族", "毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族", "俄罗斯族", "鄂温克族",
                "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族", "鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"];


            var shens = gettheSheng();
            console.log(shens);

            var option = "";
            var shenoption = "";
            var hjshenoption = "";

            for (var i = 0; i <
                shens.length; i++) {
                //shenoption += '<option value="' + shens[i]["f_FullName"] + '">' + shens[i]["f_FullName"] + '</option>';
                shenoption += '<option value="' + shens[i]["f_Id"] + '">' + shens[i]["f_FullName"] + '</option>';
            }
            for (var i = 0; i <
                nations.length; i++) {
                option += '<option value="' + nations[i] + '">' + nations[i] + '</option>';
            }
            $(shenoption).appendTo("#sheng");
            $(option).appendTo("#nation");
            $(shenoption).appendTo("#hjsheng");
            $(shenoption).appendTo("#xjsheng");
            if (key != null) {

                $("#sheng").val(a.corn[0].sheng);
            }
            var _shioption = "";

            if (key != null) {
                var _shi = gettheShi(a.corn[0].sheng);

                for (var i = 0; i <
                    _shi.length; i++) {


                    _shioption += '<option value="' + _shi[i]["f_Id"] + '">' + _shi[i]["f_FullName"] + '</option>';
                }
                $(_shioption).appendTo("#shi");
                var _hjshioption = "";
                var _hjxianoption = "";
                var _xjshioption = "";
                var _xjxianoption = "";
                var _hjshilis = gettheShithree(a.corn[0].hjsheng);
                var _xjshilis = gettheShithree(a.corn[0].xjsheng);

                for (var i = 0; i <
                    _hjshilis.length; i++) {
                    _hjshioption += '<option value="' + _hjshilis[i]["f_Id"] + '">' + _hjshilis[i]["f_FullName"] + '</option>';
                }
                $(_hjshioption).appendTo("#hjshi");//户籍市区
                for (var i = 0; i <
                    _xjshilis.length; i++) {
                    _xjshioption += '<option value="' + _xjshilis[i]["f_Id"] + '">' + _xjshilis[i]["f_FullName"] + '</option>';
                }
                $(_xjshioption).appendTo("#xjshi");

                var _hjxianlist = gettheShithree(a.corn[0].hjshi);
                var _xjxianlist = gettheShithree(a.corn[0].xjshi);


                for (var i = 0; i <
                    _hjxianlist.length; i++) {


                    _hjxianoption += '<option value="' + _hjxianlist[i]["f_Id"] + '">' + _hjxianlist[i]["f_FullName"] + '</option>';
                }
                for (var i = 0; i <
                    _xjxianlist.length; i++) {
                    _xjxianoption += '<option value="' + _xjxianlist[i]["f_Id"] + '">' + _xjxianlist[i]["f_FullName"] + '</option>';
                }
                $(_hjxianoption).appendTo("#hjxian");
                $(_xjxianoption).appendTo("#xjxian");
                $("#shi").val(a.corn[0].shi);
                $("#hjsheng").val(a.corn[0].hjsheng);
                $("#hjshi").val(a.corn[0].hjshi);
                $("#hjxian").val(a.corn[0].hjxian);
                $("#xjsheng").val(a.corn[0].xjsheng);
                $("#xjshi").val(a.corn[0].xjshi);
                $("#xjxian").val(a.corn[0].xjxian);
                $("#nation").val(a.corn[0].areas);
            }
        });
        function testfunc() {
            console.log(16);
        }
        function gettheshit() {
            console.log("lookthshit");
            console.log($("#jbxxid").val() == '');
            console.log($("#jbxxid").val());
            console.log($("#jbxxid").val() === '');
            console.log($.isEmptyObject($("#jbxxid").val()));

            var expreess = $("#jbxxid").val() === '' ? '' : '?Jbxxid=' + $("#jbxxid").val();
            console.log(expreess);
            return "/infos/GetjibinginfosbyList" + expreess;
            //return "/infos/GetjibinginfosbyList?Jbxxid="+$("#jbxxid").val();
        }


        function gettheshiteducation() {

            var expreess = $("#jbxxid").val() === '' ? '' : '?Jbxxid=' + $("#jbxxid").val();

            //'/infos/GeteducationsInfosbyList?Jbxxid='+$("#jbxxid").val()
            return "/infos/GeteducationsInfosbyList" + expreess;
        }

        function gettheshitjob() {

            var expreess = $("#jbxxid").val() === '' ? '' : '?Jbxxid=' + $("#jbxxid").val();

            return "/infos/GetJobinfosbyList" + expreess;
            //url:'/infos/GetJobinfosbyList?Jbxxid='+$("#jbxxid").val()

        }
        function gettheshitfamily() {


            var expreess = $("#jbxxid").val() === '' ? '' : '?Jbxxid=' + $("#jbxxid").val();
            return "/infos/GetfamilysinfosbyList" + expreess
        }

        function gettheshitjiangcheng() {
            var expreess = $("#jbxxid").val() === '' ? '' : '?Jbxxid=' + $("#jbxxid").val();

            return "/infos/GetejiangchengInfosbyList" + expreess
        }

        function taketheUUid() {
            console.log($('#uuid').val());
        }

        function deletetherecords(id) {
            $.ajax({
                url: "/Infos/deletetherecords",
                type: "post",
                async: false,
                data: {

                    _id: id
                },
                success: function (datas) {
                    layui.use('layer', function () {
                        layer = layui.layer;
                        layer.msg('该条数据完成删除', { icon: 1 }
                        );
                    });

                }
            }
            );
        }
        function deletetheworkinfos(id) {
            $.ajax({
                url: "/Infos/deletetheworkins",
                type: "post",
                async: false,
                data: {

                    _id: id
                },
                success: function (datas) {
                    layui.use('layer', function () {
                        layer = layui.layer;
                        layer.msg('该条数据完成删除', { icon: 1 }
                        );
                    });

                }
            }
            );
        }

        function deletethefamilys(id) {

            $.ajax({
                url: "/Infos/deletefamilys",
                type: "post",
                async: false,
                data: {

                    _id: id
                },
                success: function (datas) {
                    layui.use('layer', function () {
                        layer = layui.layer;
                        layer.msg('该条数据完成删除', { icon: 1 }
                        );
                    });

                }
            }
            );
        }
        function deletetheEducation(id) {

            $.ajax({
                url: "/Infos/deleteEducation",
                type: "post",
                async: false,
                data: {

                    _id: id
                },
                success: function (datas) {
                    layui.use('layer', function () {
                        layer = layui.layer;
                        layer.msg('该条数据完成删除', { icon: 1 }
                        );
                    });

                }
            }
            );
        }
        function deletetheDisease(id) {
            $.ajax({
                url: "/Infos/deleteDisease",
                type: "post",
                async: false,
                data: {

                    _id: id
                },
                success: function (datas) {

                    layui.use('layer', function () {
                        layer = layui.layer;
                        layer.msg('该数据完成提交', { icon: 1 }
                        );
                    });

                }
            }
            );
        }
        var globalparams = "";
        layui.use(['jquery', 'form'], function () {
            var form = layui.form;
            var $ = layui.jquery;
            var sel1Index = 0;
            form.on('select(selctOnchange)', function (data) {
                console.log("好啦");
            });
        })
    </script>
    <div style="zoom:80%;">
        <input type="hidden" name="jbxxid" id="jbxxid" />
        <div>
            <table>
                <tr><td colspan="6">基本信息</td></tr>
                <tr>
                    <td class="column">姓名</td>
                    <td><input readonly type="tel" name="name" id="name" autocomplete="off" class="layui-input" value="123"></td>
                    <td class="column">性别</td>
                    <td><input readonly name="sex" id="sexbox" class="layui-input" /></td>
                    <td class="column">年龄</td>
                    <td><input readonly type="number" name="age" id="age" autocomplete="off" class="layui-input"></td>
                </tr>
                <!--出生日期-->
                <tr>
                    <td class="column">出生日期</td>
                    <td>
                        <input style="font-size:smaller;padding-left:0px;" readonly type="text" name="birthAge" id="birthdate"
                               lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </td>
                    <td class="column">血型</td>
                    <td><input readonly name="bloodtype" lay-verify="required" lay-search="" id="bloodbox" class="layui-input" /></td>
                    <td class="column">民族</td>
                    <td><input readonly id="nation" name="areas" lay-verify="required" class="layui-input"></td>
                </tr>
                <!--手机号、身份证号-->
                <tr>
                    <td class="column">手机号</td>
                    <td colspan="2"><input readonly type="tel" id="phonenumber" name="phonenumber" autocomplete="off" class="layui-input" value=""></td>
                    <td class="column">身份证号码</td>
                    <td colspan="2">
                        <input style="font-size:smaller;" readonly type="text" id="idNumber" name="idNumber" lay-verify="required|identity"
                               placeholder="请输入身份证号码" autocomplete="off" class="layui-input" value="">
                    </td>
                </tr>
                <!--籍贯-->
                <tr>
                    <td class="column">籍贯所在市</td>
                    <td colspan="2"><input readonly id="sheng" name="sheng" lay-verify="required" lay-search="" lay-filter="chosethesheng" class="layui-input" /></td>
                    <td class="column">籍贯所在区/县</td>
                    <td colspan="2"><input readonly id="shi" name="shi" lay-verify="required" lay-search="" class="layui-input" lay-filter="chosethexian" /></td>
                </tr>
                <!--户籍所在地 -->
                <tr>
                    <td class="column">户籍市</td>
                    <td><input readonly id="hjsheng" name="hjsheng" lay-verify="required" lay-search="" class="layui-input" lay-filter="hjchosethesheng" /></td>
                    <td class="column">户籍区</td>
                    <td><input readonly id="hjshi" name="hjshi" lay-verify="required" lay-search="" class="layui-input" lay-filter="hjchosethexian" /></td>
                    <td class="column">户籍县</td>
                    <td><input readonly id="hjxian" name="hjxian" lay-verify="required" lay-search="" class="layui-input" lay-filter="" /></td>
                </tr>
                <!--户籍详细地址-->
                <tr>
                    <td class="column">户籍详细地址</td>
                    <td colspan="5"><input readonly type="text" name="hjszplace" id="hjszplace" lay-verify="title" autocomplete="off" class="layui-input"></td>
                </tr>
                <!--现居住地 -->
                <tr>
                    <td class="column">现居地</td>
                    <td><input readonly class="layui-input" id="xjsheng" name="xjsheng" lay-verify="required" lay-search="" lay-filter="xjchosethesheng" /></td>
                    <td class="column">市区</td>
                    <td><input readonly class="layui-input" id="xjshi" name="xjshi" lay-verify="required" lay-search="" lay-filter="xjchosethexian" /></td>
                    <td class="column">县</td>
                    <td><input readonly class="layui-input" id="xjxian" name="xjxian" lay-verify="required" lay-search="" lay-filter="xjchosethexian" /></td>
                </tr>
                <tr>
                    <td class="column">现居地详细地址</td>
                    <td colspan="5"><input readonly type="text" id="actuallyplace" name="actuallyplace" lay-verify="title" autocomplete="off" class="layui-input" value="@ViewBag.actuallyplace"></td>
                </tr>
                <!--政治面貌-->
                <tr>
                    <td class="column">政治面貌</td>
                    <td colspan="2"><input readonly name="zzmm" lay-verify="required" lay-search="" id="zhengzhimianmao" class="layui-input" /></td>
                    <td class="column">参加党派时间</td>
                    <td colspan="2"><input readonly type="text" name="dateOfJointheParty" id="dateOfJointhePartydate" lay-verify="" placeholder="yyyy" autocomplete="off" class="layui-input"></td>
                </tr>
                <tr><td colspan="6">岗位信息</td></tr>
                <tr>
                    <td class="column">工号</td>
                    <td>
                        <input readonly type="tel" name="worknumber" id="worknumber"
                               autocomplete="off" class="layui-input">
                    </td>
                    <td class="column">部门</td>
                    <td>
                        <input readonly id="demo100" type="text" name="department" autocomplete="off" class="layui-input" />
                    </td>
                    <td class="column">流程部门</td>
                    <td>
                        <input readonly id="demo200" type="text" name="dingdepartment" autocomplete="off" class="layui-input" value="@ViewBag.dingdepartment" />
                    </td>
                </tr>
                <tr>
                    <td class="column">岗位</td>
                    <td>
                        <input readonly type="tel" name="gangwei" lay-verify="" autocomplete="off" class="layui-input" id="gangwei">
                    </td>
                    <td class="column">层级</td>
                    <td>
                        <input readonly name="cengji" lay-verify="required" lay-search="" id="cengji" class="layui-input" />
                    </td>
                    <td class="column">职级</td>
                    <td>
                        <input readonly class="layui-input" name="zhiji" lay-verify="required" lay-search="" id="zhiji" />
                    </td>
                </tr>
                <tr>
                    <td class="column">入司时间</td>
                    <td>
                        <input style="font-size:smaller;padding-left:0px;" readonly type="text" name="workstarttime" id="datestartwork"
                               lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </td>
                    <td class="column">司龄</td>
                    <td>
                        <input readonly type="text" name="workage" autocomplete="off" class="layui-input" id="workage" />
                    </td>
                    <td colspan="2">单位:年</td>
                </tr>
                <tr><td colspan="6">婚姻状况</td></tr>
                <tr>
                    <td class="column">婚姻状况</td>
                    <td>
                        <input readonly class="layui-input" name="hyzk" lay-verify="required" lay-search="" id="hyzk" />
                    </td>
                    <td class="column">生育情况</td>
                    <td>
                        <input readonly class="layui-input" name="shengyu" lay-verify="required" lay-search="" id="shengyu" />
                    </td>
                    <td class="column">子女数量</td>
                    <td>
                        <input readonly class="layui-input" name="kidsnumber" lay-verify="required" lay-search="" id="kidsnumber" />
                    </td>
                </tr>
                <tr><td colspan="6">教育信息</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-hide" id="education" lay-filter="education"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">工作经历</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table id="jobtable" lay-filter="jobtable"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">家庭情况</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table id="familytable" lay-filter="familytable"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">奖惩记录</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table id="jiangcheng" lay-filter="jiangcheng"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">录用信息</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table id="tablezlxx" lay-filter="tablezlxx" class="layui-hide"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">人才测评</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-hide" id="testRccp" lay-filter="testRccp"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">人才盘点</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-hide" id="testRcpd" lay-filter="testRcpd"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">内部培训</td></tr>
                <tr>
                    <td style="column">入职引导人</td>
                    <td colspan="5"><input readonly name="rzpxr" placeholder="" lay-verify="required" class="layui-input" id="rzpxr" lay-filter="rzpxr"></td>
                </tr>

                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-table" id="tb_rzpx" lay-filter="tb_rzpx">
                                <colgroup>
                                    <col>
                                    <col width="150">
                                    <col width="260">
                                    <col width="150">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>文件名</th>
                                        <th>大小</th>
                                        <th>上传进度</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="pxjhList"></tbody>
                            </table>
                        </div>
                    </td>
                </tr>

                <tr><td colspan="6">其他培训</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-hide" id="qtpx" lay-filter="lyqtpx"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">外部培训</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-hide" id="wbpx" lay-filter="lywbpx"></table>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="6">证书</td></tr>
                <tr>
                    <td colspan="6">
                        <div>
                            <table class="layui-hide" id="zsxx" lay-filter="lyzsxx"></table>
                        </div>
                    </td>
                </tr>

            </table>
        </div>
        <p style="text-align:center;">劳动关系</p>
        <div class="layui-tab-item layui-show">
            <form lay-filter="ldgx" class="layui-form layui-form-pane" action="">
                <input type="hidden" name="id">
                <input type="hidden" name="jbxxid">
                <!--就职状态-->
                <div class="layui-inline">
                    <label class="layui-form-label">就职状态:</label>
                    <div class="layui-input-inline">
                        <select name="JobStatus" lay-filter="JobStat" lay-verify="required" lay-search="">
                            <option value="">下拉选择</option>
                            <option value="在职">在职</option>
                            <option value="离职">离职</option>
                        </select>
                    </div>
                </div>

                <!--离职时间-->
                <div class="layui-inline" id="leavetime" style="display:none">
                    <label class="layui-form-label">离职时间:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="LeaveDate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!--离职原因-->
                <div class="" id="leaveyy" style="display:none">
                    <label class="layui-form-label">离职原因:</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="leaveNote" placeholder="填写离职原因" style="width:800px">
                    </div>
                </div>
                <!--工作交接-->
                <div class="layui-form-item" id="workjiaojie" style="display:none">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="UpWorkFiles">选择《工作交接表》</button>
                        <button type="button" class="layui-btn" id="WorkFileUP">开始上传</button>
                        <input name="WorkFiles" id="WorkFiles" hidden="hidden" value="" />
                        <div class="layui-upload-list" style="max-width: 1000px">
                            <table class="layui-table" id="tb_UpWorkFiles" lay-filter="tb_UpWorkFiles">
                                <colgroup>
                                    <col>
                                    <col width="150">
                                    <col width="260">
                                    <col width="150">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>文件名</th>
                                        <th>大小</th>
                                        <th>上传进度</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="WorkFilesList"></tbody>
                            </table>
                            <script type="text/html" id="barlzfj">
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="lz_del">删除</a>
                            </script>
                        </div>
                    </div>

                </div>
            </form>
        </div>
        <p class="layui-colla-title">劳动合同</p>
        <div class="layui-tab-item layui-show">
            <form lay-filter="ldht" class="layui-form layui-form-pane" action="">
                <input type="hidden" name="id">
                <input type="hidden" name="jbxxid">

                <fieldset class="layui-elem-field">
                    <legend>当前状态</legend>
                    <!--合同类型-->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width:150px">合同类型:</label>
                            <div class="" style="margin-left:150px;">
                                <select name="type" lay-verify="required" lay-search="" lay-filter="htype">
                                    <option value="">下拉选择合同签订类型</option>
                                    <option value="首次签订劳动合同">首次签订劳动合同</option>
                                    <option value="二次签订劳动合同">二次签订劳动合同</option>
                                    <option value="无固定期限劳动合同">无固定期限劳动合同</option>
                                </select>
                            </div>
                        </div>

                        <!--合同期限-->
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width:150px">合同期限（年）:</label>
                            <div class="" style="margin-left:150px;">
                                @*<input type="text" name="year" class="layui-input">*@
                                <select name="year" lay-verify="required" lay-search="">
                                    <option value="">下拉选择年限</option>
                                    <option value="1年">1年</option>
                                    <option value="2年">2年</option>
                                    <option value="3年">3年</option>
                                    <option value="4年">4年</option>
                                    <option value="5年">5年</option>
                                    <option value="6年">6年</option>
                                    <option value="7年">7年</option>
                                    <option value="8年">8年</option>
                                    <option value="9年">9年</option>
                                    <option value="10年">10年</option>
                                    <option value="无固定期限">无固定期限</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">

                        <!--起止时间-->
                        <div class="layui-inline">
                            <label class="layui-form-label" style="width:150px">开始时间:</label>
                            <div class="" style="margin-left:150px;">
                                <input type="text" name="sdate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline" id="e_date" style="display:none">
                            <label class="layui-form-label" style="width:150px">结束时间:</label>
                            <div class="" style="margin-left:150px;">
                                <input type="text" name="edate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                    </div>
                </fieldset>

                <fieldset class="layui-elem-field">
                    <legend>历史状态</legend>
                    <div class="layui-form-item">
                        <table class="layui-hide" id="oldht" lay-filter="lyoldht"></table>
                        <script type="text/html" id="toolbarOldht">
                            <button type="button" id="ldhtAddRow" class="layui-btn" lay-event="add_oldht">添加</button>
                        </script>
                        <script type="text/html" id="barOldht">
                            <a class="layui-btn layui-btn-xs" lay-event="edit_oldht">编辑</a>
                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_oldht">删除</a>
                        </script>
                    </div>
                </fieldset>
            </form>
        </div>
        <p class="layui-colla-title">试用期管理</p>
        <div class="layui-tab-item layui-show">
            <form lay-filter="syq" class="layui-form layui-form-pane" action="">
                <input type="hidden" name="id">
                <input type="hidden" name="jbxxid">
                <!--试用期-->
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:150px">试用期：</label>
                    <div class="layui-input-inline" style="width:120px">
                        <select name="syq" lay-verify="required" lay-search="">
                            <option value="">下拉选择</option>
                            <option value="1个月">1个月</option>
                            <option value="2个月">2个月</option>
                            <option value="3个月">3个月</option>
                            <option value="4个月">4个月</option>
                            <option value="5个月">5个月</option>
                            <option value="6个月">6个月</option>
                        </select>
                    </div>
                </div>

                <!--起止时间-->
                <div class="layui-inline">
                    <label class="layui-form-label">起止时间:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="sdate" id="date" lay-verify="date" placeholder="开始日期" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" id="e_date">
                    <div class="layui-input-inline">
                        <input type="text" name="edate" id="date" lay-verify="date" placeholder="结束日期" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <hr class="layui-border-green">
                <!--转正类型-->
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:150px">转正类型:</label>
                    <div class="layui-input-inline" style="width:120px">
                        <select name="zzlx" lay-filter="zztype" lay-verify="required" lay-search="">
                            <option value="">下拉选择</option>
                            <option value="正常转正">正常转正</option>
                            <option value="提前转正">提前转正</option>
                            <option value="延迟转正">延迟转正</option>
                        </select>
                    </div>
                </div>
                <!--原因说明-->
                <div class="layui-inline" id="zzyy" style="display:none">
                    <label class="layui-form-label">原因说明：</label>
                    <div class="layui-input-block">
                        <input type="text" name="zznote" class="layui-input" placeholder="转正原因说明" style="width:350px">
                    </div>
                </div>
                <hr class="layui-border-green">
                <!--是否家访-->
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:150px">是否家访:</label>
                    <div class="layui-input-inline" style="width:120px">
                        <select name="isjf" lay-verify="required" lay-search="">
                            <option value="">下拉选择</option>
                            <option value="是">是</option>
                            <option value="否">否</option>
                        </select>
                    </div>
                </div>

                <!--家访时间-->
                <div class="layui-inline">
                    <label class="layui-form-label">家访时间:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="jfdate" class="layui-input" placeholder="yyyy-MM-dd">
                    </div>
                </div>

                <!--家访人-->
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:150px">家访人：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <input type="tel" name="jfr" lay-verify="required|phone" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!--是否有担保-->
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:150px">是否有担保物:</label>
                    <div class="layui-input-inline" style="width:120px">
                        <select name="isdb" lay-verify="required" lay-search="" lay-filter="sfdb" style="width:200px">
                            <option value="">下拉选择</option>
                            <option value="是">是</option>
                            <option value="否">否</option>
                        </select>
                    </div>
                </div>
                <!--担保人-->
                <div class="layui-inline">
                    <label class="layui-form-label">担保人：</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="dbr" lay-verify="required|phone" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!--与担保人关系-->
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:150px">与担保人关系：</label>
                    <div class="layui-input-inline" style="width:150px">
                        <input type="tel" name="dbrgx" lay-verify="required|phone" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <hr class="layui-border-green">
                <!--担保物-->
                <div class="layui-form-item" id="dbw" style="display:none">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="UPdbfiles">附件-家访资料</button>
                        <button type="button" class="layui-btn" id="bt_dbfiles">开始上传</button>
                        <p><a style="color:red">请上传《担保书》、《家访记录表》、《担保人身份证复印件》、《担保物复印件》。</a></p>
                        <input name="dbfiles" id="dbfiles" hidden="hidden" value="" />
                        <div class="layui-upload-list" style="max-width: 1000px;">
                            <table class="layui-table" id="tb_syq" lay-filter="tb_syq">
                                <colgroup>
                                    <col>
                                    <col width="150">
                                    <col width="260">
                                    <col width="150">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>文件名</th>
                                        <th>大小</th>
                                        <th>上传进度</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="dbfilesList"></tbody>
                            </table>
                            <script type="text/html" id="barsydbw">
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="syq_del">删除</a>
                            </script>
                        </div>

                    </div>
                </div>
            </form>
        </div>
        <p class="layui-colla-title">配置情况</p>
        <div class="layui-tab-item layui-show">
            <form lay-filter="pzxx" class="layui-form layui-form-pane" action="">
                <input type="hidden" name="id">
                <input type="hidden" name="jbxxid">

                <hr class="layui-border-green">

                <div class="layui-form-item">
                    <table class="layui-hide" id="pzxx" lay-filter="lypzxx"></table>

                    <script type="text/html" id="toolbarpzxx">
                        <a class="layui-btn layui-btn-xs" lay-event="edit_pzxx">编辑</a>
                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del_pzxx">删除</a>
                    </script>
                </div>

                <script type="text/html" id="barpzxx">
                    <button type="button" id="pzxxAddRow" class="layui-btn" lay-event="add_pzxx">添加</button>
                </script>


            </form>
        </div>
    </div>
    <script lay-filter="yesorno" id="yesorno" style="text-align:center;">
        <p id="yesyes"> 是 </p>
        <p id="nono"> 否 </p>
    </script>
    <script>
        if (@Context.Session.GetString("rid") == 1 || @Context.Session.GetString("rid") == 4) {
            $(".btnsave").hide();
        }
    </script>
    <script>
        var kkkk = $("#jbxxid").val();
        layui.use('table', function () {
            var table = layui.table;
            var form = layui.form;
            //执行一个 table 实例
            table.render({
                elem: '#education'
                , url: gettheshiteducation()
                , method: "get"
                , contentType: 'json'
                , even: true
                , cols: [[
                    { field: 'starttime', width: 80, title: '开始时间' }
                    , { field: 'endtime', width: 80, title: '结束时间' }
                    , { field: 'school', width: 120, title: '毕业学校', sort: true }
                    , { field: 'yuanxi', width: 120, title: '专业', sort: true }
                    , { field: 'xuexixingshi', width: 180, title: '学习形式' }
                    , { field: 'zhengshunumber', width: 130, title: '证书编号' }
                    , { field: 'xuexinresult', width: 140, title: '学信网查验结果' }
                    , { field: 'xuexinreason', width: 80, title: '备注' }
                    , { field: 'fileUrl', width: 80, title: '学信网查验报告', templet: proofPicturefileurl }
                ]]
                , done: function (res) {

                    if (res.data[0].xuexinresult != "已查实") {
                        $("[data-field='fileUrl']").css('display', 'none');
                    } else {
                        $("[data-field='xuexinreason']").css('display', 'none');

                    }
                }
            });
            table.render({
                elem: '#jiangcheng'
                , url: gettheshitjiangcheng()
                , method: "get"
                , contentType: 'json'
                , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
                , title: '奖惩记录表'
                , cols: [[
                    {
                        field: 'type', width: 80, title: '形式', minWidth: 80,
                        templet: function (o) {
                            if (o.type.replace(/\s*/g, "") == "1") {
                                return "奖励";
                            } else {
                                return "惩罚";
                            }
                        }, sort: true
                    }
                    , { field: 'nianfen', width: 120, title: '获取时间', minWidth: 120 }
                    , { field: 'recordsremark', width: 140, title: '情况说明', minWidth: 140 }
                ]]
            });
            table.render({
                elem: '#testo'
                , url: gettheshit()
                , cols: [[
                    , { field: 'time', width: 120, title: '时间', minWidth: 120 }
                    , { field: 'diseasehistory', width: 100, title: '疾病史', sort: true, minWidth: 100 }
                    , { field: 'diseasestatus', width: 180, title: '治疗现状', minWidth: 180 }
                    , { fixed: 'right', title: '操作', width: 125, minWidth: 125, toolbar: '#modifyAndDelete' }
                ]]
            });
        });
    </script>
    <script>
        layui.use('table', function () {
            var table = layui.table;
            console.log("kk7kk");
            console.log($("#jbxxid").val());
            table.render({
                elem: '#jobtable',
                url: gettheshitjob()
                , title: '用户数据表'
                , cols: [[
                    , { field: 'starttime', title: '开始时间', width: 120, fixed: 'left', unresize: true, sort: true }
                    , { field: 'endtime', title: '结束时间', width: 120, fixed: 'left', unresize: true, sort: true }
                    , { field: 'workplace', title: '工作单位', width: 120, edit: 'text' }
                    , { field: 'department', title: '岗位', width: 120 }
                ]]
            });
        });
    </script>
    <script>
        layui.use('table', function () {
            var table = layui.table;
            var spcial = document.getElementById("jbxxid").value;
            console.log(spcial);
            table.render({
                elem: '#familytable',
                url: gettheshitfamily()
                , cols: [[ //标题栏
                    , { field: 'id', width: 80, sort: true, fixed: true, hide: true }
                    , { field: 'relation', title: '关系', width: 80 }
                    , { field: 'name', title: '姓名', minWidth: 60 }
                    , { field: 'birthday', title: '出生年月', minWidth: 70 }
                    , { field: 'workplace', title: '工作单位', minWidth: 80 }
                    , { field: 'adresse', title: '现住址', width: 120 }
                    , { field: 'phone', title: '紧急联系电话', width: 100 }
                ]]
                , even: true
            })
        })
    </script>
    <script>
        $("#withExport").click(function () {
            layer.msg("点击事件");
        });

        layui.use('form', function () {
            var form = layui.form;

            form.on('radio(passornot)', function (data) {

                if ($('#IsPurchased input[name="situation"]:checked ').val() == "合格") {
                    $("#notpassstatus").hide();
                    $("#hegeyesorno").show();
                    $("#uptjbg").show();

                }
                else {
                    $("#notpassstatus").show();
                    $("#hegeyesorno").hide();
                    $("#uptjbg").hide();

                }
                form.render();
            });
        });
        function selonchange() {
            console.log("cccc");
            sel1Index = this.selectedIndex - 1;// 设定数组省级下标从0开始
            //  console.log(sel1Index);
            sel2.options.length = 0;//点击省选项改变清空之前市级选项
            sel3.options.length = 0;
            if (sel1Index != -1) {
                cityArr = citys[sel1Index].city
                //console.log(cityArr);
                //市级遍历
                cityArr.forEach(v => {
                    var option = new Option(v.name);
                    sel2.options.add(option);//市
                })

                areaArr = cityArr[0].area;
                sel3.options.length = 0;
                //区级遍历
                areaArr.forEach(v => {
                    var option = new Option(v);
                    sel3.options.add(option);//区
                })

                address.innerText = citys[sel1Index].name + cityArr[0].name + areaArr[0];
            }
            else {
                address.innerText = "";
            }


        }
        var los = [
            {
                title: 'menu item 5'
                , id: 5
                , child: [{
                    title: 'menu item 5-1'
                    , id: 55
                    , child: [{
                        title: 'menu item 5-1-1'
                        , id: 5555
                    }, {
                        title: 'menu item 5-1-2'
                        , id: 55555
                    }, {
                        title: 'menu item 5-1-3'
                        , id: 555555
                    }]
                }, {
                    title: 'menu item 5-2'
                    , id: 52
                }, {
                    title: 'menu item 5-3'
                    , id: 53
                }]
            }]

        console.log(los);

        function gettheUserldatas() {

            var lis = [];

            $.ajax({
                url: "/User/GetUserData",
                type: "post",
                async: false,
                success: function (datas) {

                    lis = datas;
                    console.log(lis);

                }
            })

            return lis;

        }

        function gettheOriginaldatas() {



            var lis = [];

            $.ajax({
                url: "/TreeData/GetOrgTreeDatanew",
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;
                    console.log(lis);


                }
            })

            return lis;

        }

        function gettheSheng() {




            var lis = [];


            $.ajax({
                url: "/TreeData/getthesheng",
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);
            return lis;




        }


        function gettheShithree(f_id) {



            var lis = [];

            $.ajax({
                url: "/TreeData/gettheshithree?f_id=" + f_id,
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);


            return lis;



        }
        function gettheShi(f_id) {


            var lis = [];

            $.ajax({
                url: "/TreeData/gettheshi?f_id=" + f_id,
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);


            return lis;


        }

        function getthexian(f_id) {

            var lis = [];

            $.ajax({
                url: "/TreeData/getthexian?f_id=" + f_id,
                type: "post",
                async: false,
                success: function (datas) {



                    lis = datas;



                }
            })
            console.log(lis);
            return lis;

        }


        layui.use(['dropdown', 'util', 'layer'], function () {
            var element = layui.element;
            var layer = layui.layer;
            var dropdown = layui.dropdown
                , util = layui.util
                , layer = layui.layer
                , table = layui.table
                , $ = layui.jquery;



            dropdown.render({
                elem: '#demo100',
                //data:los,
                data: gettheOriginaldatas(),

                click: function (item) {
                    //layer.msg(util.escape(JSON.stringify(item)));
                    this.elem.val(item.title);
                }
            });

            dropdown.render({
                elem: '#demo200',
                //data:los,
                data: GetDingDept(),

                click: function (item) {
                    //layer.msg(util.escape(JSON.stringify(item)));
                    this.elem.val(item.title);
                }
            });
            //dropdown.render({
            //    elem: '#gettheSheng',
            //    //data:los,
            //    data: gettheSheng(),

            //    click: function (item) {
            //        //layer.msg(util.escape(JSON.stringify(item)));
            //        this.elem.val(item.title);
            //    }
            //});

            //监听折叠
            element.on('collapse(test)', function (data) {
                layer.msg('展开状态：' + data.show);
            });
        });
    </script>
    <script>

        layui.use(['element', 'form', 'layedit', 'laydate'], function () {
            var $ = layui.jquery
                , element = layui.element //Tab的切换功能，切换事件监听等，需要依赖element模块
                , form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#date'
            });
            laydate.render({
                elem: '#dateOfJointhePartydate',
                type: 'year'
            });

            laydate.render({
                elem: '#birthdate',
                done: function (value, date) {

                    console.log("sahengri");
                    let chosetime = value.substr(0, 10);
                    let chose = new Date(chosetime);
                    let nowtime = new Date(new Date());
                    var day = nowtime.getTime() - chose.getTime();
                    var key = parseInt(day / (1000 * 60 * 60 * 24));
                    //$(’#_orgId’).val(data._orgId);
                    if (key < 0) {
                        layer.alert('你日期选错了老铁，今天是' + value + '你选择的日期，都大于今天了！！');
                    }

                    else {

                        console.log(Math.floor(key / 365));
                        $('#age').val(Math.floor(key / 365));
                    }
                }

            });
            laydate.render({
                elem: '#workstart'
            });

            laydate.render({
                elem: '#workend'
            });
            laydate.render({
                elem: '#chengfayear'
            });

            laydate.render({

                elem: '#workstartmonth',
                type: 'month',
                format: 'MM'


            });

            laydate.render({

                elem: '#workendmonth',
                type: 'month',
                format: 'MM'

            });


            //form.val('addthevalues', {
            //    "hyzk": /*@ViewBag.hyzk;*/

            //    });

            form.on('select(xjchosethesheng)', function (data) {


                $("#xjshi").empty();

                $("#xjxian").empty();
                var xjshioption = "";
                var xjxianoption = "";

                var f_id = data.value;

                var xjshilis = gettheShithree(f_id);


                for (var i = 0; i <
                    xjshilis.length; i++) {


                    xjshioption += '<option value="' + xjshilis[i]["f_Id"] + '">' + xjshilis[i]["f_FullName"] + '</option>';
                }


                $(xjshioption).appendTo("#xjshi");


                var keyid = $("#xjshi").val();


                var xjxianlist = gettheShithree(keyid);




                for (var i = 0; i <
                    xjxianlist.length; i++) {


                    xjxianoption += '<option value="' + xjxianlist[i]["f_Id"] + '">' + xjxianlist[i]["f_FullName"] + '</option>';
                }

                $(xjxianoption).appendTo("#xjxian");



                form.render();



            })



            form.on('select(hjchosethesheng)', function (data) {


                $("#hjshi").empty();
                $("#hjxian").empty();
                var hjshioption = "";
                var hjxianoption = "";
                var f_id = data.value;
                var hjshilis = gettheShithree(f_id);


                for (var i = 0; i <
                    hjshilis.length; i++) {


                    hjshioption += '<option value="' + hjshilis[i]["f_Id"] + '">' + hjshilis[i]["f_FullName"] + '</option>';
                }


                $(hjshioption).appendTo("#hjshi");



                var keyid = $("#hjshi").val();


                var hjxianlist = gettheShithree(keyid);

                for (var i = 0; i <
                    hjxianlist.length; i++) {


                    hjxianoption += '<option value="' + hjxianlist[i]["f_Id"] + '">' + hjxianlist[i]["f_FullName"] + '</option>';
                }





                $(hjxianoption).appendTo("#hjxian");
                form.render();




            })
            form.on('select(chosethesheng)', function (data) {

                $("#shi").empty();
                $("#xian").empty();
                var shioption = "";

                var f_id = data.value;
                console.log(f_id);
                var shilis = gettheShi(f_id);


                for (var i = 0; i <
                    shilis.length; i++) {


                    shioption += '<option value="' + shilis[i]["f_Id"] + '">' + shilis[i]["f_FullName"] + '</option>';
                }
                $(shioption).appendTo("#shi");

                //$(xianoption).appendTo("#xian");
                form.render();



            });
            form.on('select(chosethexian)', function (data) {




                $("#xian").empty();
                var xianoption = "";
                var xian_id = data.value;
                var xianlis = getthexian(xian_id);
                console.log(xianlis);

                for (var i = 0; i <
                    xianlis.length; i++) {


                    xianoption += '<option value="' + xianlis[i]["f_Id"] + '">' + xianlis[i]["f_FullName"] + '</option>';
                }

                $(xianoption).appendTo("#xian");
                form.render();

            });

            laydate.render({
                elem: '#datestartwork'
                , done: function (value, date) {

                    let chosetime = value.substr(0, 10);
                    let chose = new Date(chosetime);
                    let nowtime = new Date(new Date());
                    var day = nowtime.getTime() - chose.getTime();
                    var key = parseInt(day / (1000 * 60 * 60 * 24));
                    //$(’#_orgId’).val(data._orgId);
                    if (key < 0) {
                        layer.alert('你日期选错了老铁，今天是' + value + '你选择的日期，都大于今天了！！');
                    }

                    else {

                        console.log(Math.floor(key / 365));


                        $('#workage').val(Math.floor(key / 365));

                        //layer.alert(Math.floor(key / 365));


                    }
                    //layer.alert('你选择的日期是：' + value + '<br>获得的对象是' + JSON.stringify(date));
                }
            });
            laydate.render({
                elem: '#date1'
            });

            //触发事件
            var active = {
                tabAdd: function () {
                    //新增一个Tab项
                    element.tabAdd('demo', {
                        title: '新选项' + (Math.random() * 1000 | 0) //用于演示
                        , content: '内容' + (Math.random() * 1000 | 0)
                        , id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                    })
                }
                , tabDelete: function (othis) {
                    //删除指定Tab项
                    element.tabDelete('demo', '44'); //删除：“商品管理”


                    othis.addClass('layui-btn-disabled');
                }
                , tabChange: function () {
                    //切换到指定Tab项
                    element.tabChange('demo', '22'); //切换到：用户管理
                }
            };

            $('.site-demo-active').on('click', function () {
                var othis = $(this), type = othis.data('type');
                active[type] ? active[type].call(this, othis) : '';
            });

            //Hash地址的定位
            var layid = location.hash.replace(/^#test=/, '');
            element.tabChange('test', layid);

            element.on('tab(test)', function (elem) {
                location.hash = 'test=' + $(this).attr('lay-id');
            });

        });
    </script>
</body>
</html>